Today, mobile devices such as smart phones are used in a wide variety of environments. In some environments (i.e., contexts) it may be desirable to automatically configure a mobile device for a particular use. For example, if the mobile device enters a vehicle, it may be desirable that the mobile device enters into a safe-driving mode in which the device's user interface is easier to use and in which certain functions of the device are disabled. However, in order to enter automatically into such a mode, the context of the device should also be determined automatically. Furthermore, it is desirable to determine said context in a reliable manner.